body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f9f9f9;
}

.container {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

h1, h2 {
    color: #2c3e50;
    margin-top: 0;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

textarea {
    width: 100%;
    height: 120px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 16px;
    resize: vertical;
    margin-bottom: 15px;
}

.button-group {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

button {
    padding: 10px 18px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.convert-btn {
    background-color: #3498db;
    color: white;
}

.convert-btn:hover {
    background-color: #2980b9;
}

.translate-btn {
    background-color: #9b59b6;
    color: white;
}

.translate-btn:hover {
    background-color: #8e44ad;
}

.copy-btn {
    background-color: #2ecc71;
    color: white;
}

.copy-btn:hover {
    background-color: #27ae60;
}

.delete-btn {
    background-color: #e74c3c;
    color: white;
}

.delete-btn:hover {
    background-color: #c0392b;
}

#result {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #3498db;
}

.result-content {
    margin-bottom: 15px;
    white-space: pre-line;
}

.history-item {
    padding: 15px;
    margin-bottom: 15px;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
}

.history-item-actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

.copy-message {
    position: absolute;
    right: 15px;
    top: 15px;
    background-color: #2ecc71;
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    display: none;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.no-history {
    text-align: center;
    color: #7f8c8d;
    padding: 20px;
}

.error-message {
    color: #e74c3c;
    font-weight: bold;
}

.mode-indicator {
    margin-bottom: 15px;
    padding: 8px;
    background-color: #f0f0f0;
    border-radius: 4px;
    font-weight: bold;
}

.mode-convert {
    border-left: 4px solid #3498db;
}

.mode-translate {
    border-left: 4px solid #9b59b6;
}

.pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.pagination button {
    padding: 8px 16px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.pagination button:hover {
    background-color: #2980b9;
}

.pagination button:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.pagination span {
    padding: 8px 16px;
    align-self: center;
}

.page-size-selector {
    margin-bottom: 15px;
}

.page-size-selector select {
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}